(function (window, $) {
    var news = {
        init: function () {
            this.cacheElment();
            this.bindEvent();
        },
        cacheElment: function () {

        },
        bindEvent: function () {
            this.initNews();
        },
        initNews: function () {
            var data = [{
                imageUrl: 'images/03_照明产品列表_38.png',
                title: 'SUPFIRE神火S11'
            }, {
                imageUrl: 'images/03_照明产品列表_03.jpg',
                title: 'SUPFIRE神火Y12'
            }, {
                imageUrl: 'images/03_照明产品列表_03.jpg',
                title: 'SUPFIRE神火M6'
            }, {
                imageUrl: 'images/03_照明产品列表_15.jpg',
                title: 'SUPFIRE神火L5'
            }, {
                imageUrl: 'images/03_照明产品列表_15-05.jpg',
                title: 'SUPFIRE神火L6-S'
            }, {
                imageUrl: 'images/03_照明产品列表_15-06.jpg',
                title: 'SUPFIRE神火C8-S'
            }, {
                imageUrl: 'images/03_照明产品列表_26.jpg',
                title: 'SUPFIRE神火L5-L2'
            }, {
                imageUrl: 'images/03_照明产品列表_26-08.jpg',
                title: 'SUPFIRE神火L6-S'
            }, {
                imageUrl: 'images/03_照明产品列表_15-06.jpg',
                title: 'SUPFIRE神火C8-S'
            }, {
                imageUrl: 'images/03_照明产品列表_26.jpg',
                title: 'SUPFIRE神火L5-L2'
            }, {
                imageUrl: 'images/03_照明产品列表_26-08.jpg',
                title: 'SUPFIRE神火L6-S'
            }]
            $('#newsTable').DataTable({
                searching: false,
                bInfo: false,
                ordering: false,
                autoWidth: false,
                lengthChange: false,
                iDisplayLength: 6, // 每页显示行数
                language: {
                    "paginate": {
                        "previous": "上一页",
                        "next": "下一页"
                    }
                },
                "data": data,
                columns: [
                    {
                        width: "100px",
                        className: "date",
                        render: function (data, type, row, meta) {
                            var str = '<div class="lightList-wrapper">' +
                                '<a href="lightDetail.html">' +
                                '<img src=' + row.imageUrl + '>' +
                                '<div class="text">' + row.title + '</div>' +
                                '</a>' +
                                '</div>'
                            return str;
                        }
                    }]
            });
        }
    }
    news.init();
})(window, jQuery);
